<? 
session_start(); ?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Inicio de Sesion</title>
<style type="text/css">
<!--
.Estilo1 {color: #FFFFFF}
.Estilo2 {font-size: 18px; color: #FFFFFF; }
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	color: #000000;
}
body {
	background-color: #FFFFFF;
}
a {
	font-family: Courier New, Courier, mono;
	font-size: 14px;
	color: #FFFFFF;
}
a:visited {
	color: #000000;
}
a:hover {
	color: #000000;
}
a:active {
	color: #666666;
}
-->
</style>
<style type="text/css">
<!--
a:link {
	color: #000000;
}
.style10 {font-size: 18px}
-->
</style></head>

<body>
</table>
</form>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="200" align="center">
  <tr>
    <td><div align="center"><span class="style10">
       
	    <?
     extract($_POST);
     extract($_GET);
	include 'conexion.php';
	
	
    $resultado = mysql_query("Select * from usuario where usuario='$usu' and clave='$cla'", $conexion);
        $registro = mysql_fetch_array($resultado);
		 if ($registro){
		 $_SESSION['usuario']=$registro[0];
		 		 ?>
		  <script language='JavaScript'>
	window.self.location="index1.php"
  alert('!Usuario Registrado!')
</script>
		 
		<? } else { ?>
		   <script language='JavaScript'>
	window.self.location="index.php"
</script>
		<? } ?>
        
    </span> </div>
    <div align="center"></div></td>
  </tr>
</table>
</body>
</html>
